<div class='weui-btn-area' style='max-width: 450px;'>
	<div class='bc-info visible-xs' data-port='http://api.hongyanche.com/user/info' cache='user'>
		<div class='weui-flex-center weui-flex-center-xs' style="padding:15px;">
			<headimgurl info=i><img class='headimg' /></headimgurl>
			<user_name info=1></user_name>&nbsp;
			<small mute>你正在添加管理员</small>
		</div>
	</div>
	<div class='weui-cells__title'>查找用户</div>
	<div class='weui-cells' style='border-radius: 5px;'>
		<div class='bc-info no-init' id="admin-new-search-info" style='text-align: center;padding:20px;' data-port='http://api.hongyanche.com/admin/search'>
			<headimgurl info=i><img class='headimg-lg' /></headimgurl>
			<br/>
			<user_id info=d> #<user_id info=1></user_id> </user_id> <user_name info=1><small mute>搜索用户</small></user_name>
			<error><small mute>没有找到用户</small></error>
		</div>
		<div class='weui-cell'>
			<div class='weui-cell__hd'>
				<label class='weui-label'>手机号码 :</label>
			</div>
			<div class='weui-cell__hd bc-input-focus'>
				<form onsubmit="$('#admin-new-search').trigger('click')">
					<input autocomplete='off' type='tel' id="admin-new-tel-input" placeholder="输入用户手机号码" class='weui-input' / >
				</form>
			</div>
		</div>
	</div>
	<div id="admin-new-class-rank" style='display: none;'>
		<div class='weui-cells__title'>选择类型</div>
		<div class="weui-cells weui-cells_radio bc-rank" data-port='http://api.hongyanche.com/admin/list_option' style='border-radius: 5px;'>
			<label class="bc-rank-template weui-cell weui-check__label">
				<div class="weui-cell__bd">
					<p>__value__</p>
				</div>
				<div class="weui-cell__ft">
					<input autocomplete='off' name='admin-class' type="radio" class="weui-check" value="__value__">
					<span class="weui-icon weui-icon-checked"></span>
				</div>
			</label>
		</div>
	</div>
	<div class='weui-btn-area' id="admin-new-search-container">
		<a class='weui-btn weui-btn_primary' id="admin-new-search">搜索</a>
		<a class='weui-btn visible-xs weui-btn_default' onclick="history.back()">返回</a>
	</div>
	<div class='weui-btn-area' id="admin-new-confirm-container" style='display: none;'>
		<a class='weui-btn weui-btn_warn' id="admin-new-confirm">添加</a>
		<a class='weui-btn weui-btn_default' id="admin-new-cancel">取消</a>
	</div>
</div>
<br/>
<sss>
	var adminNew = {
		init:function(){
			<!-- var rank = $("#admin-new-class-rank"); -->
			<!-- var info = $("#admin-new-search-info"); -->
			<!-- var ct_c = $("#admin-new-confirm-container"); -->
			<!-- var ct_s = $("#admin-new-search-container"); -->
			setTimeout(function(){
				$("#admin-new-tel-input").focus();
			},500)
			$("#admin-new-search").on('click',function(){
				var t = $("#admin-new-tel-input")
				var tel = t.val();
				if(!tel.length) return;
				INFO.reload('#admin-new-search-info',{tel:tel});
			})
			$("#admin-new-search-info").on('bc-info-success',function(){
				$('#admin-new-class-rank').fadeIn();
				$('#admin-new-confirm-container').fadeIn();
				$('#admin-new-search-container').hide();
				$("#admin-new-tel-input").attr('disabled','disabled');
			})
			$("#admin-new-cancel").on('click',function(){
				var t = $("#admin-new-tel-input")
				t.removeAttr('disabled');
				t.val('');
				t.focus();
				$('#admin-new-class-rank').hide();
				$('#admin-new-confirm-container').hide();
				$('#admin-new-search-container').fadeIn();
			})
			var tel
			var className
			POST.init("#admin-new-confirm",{
				stop:function(){
					tel = $("#admin-new-tel-input").val();
					if(!tel.length){return true}
						className = $("input[name='admin-class']:checked").val();
					if(!className){alert('选择管理员类别');return true;}
					<!-- console.log(tel,className); -->
					<!-- return true; -->
				},
				url:'http://api.hongyanche.com/admin/add',
				input:function(){return {tel:tel,class:className}},
				success:function(){
					LIST.reload('#admin-list');
				},
				msg:{
					'admin already exist':'用户已添加',
					<!-- 'admin already exist':'用户已添加', -->
				}
			})
		}
	}
	adminNew.init();
</sss>